package net.zjitc.controller;

import net.zjitc.entity.Admin;
import net.zjitc.service.AdminService;
import net.zjitc.utils.Result;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 毛若颖
 * @date 2024/12/20 15:29
 */
@RestController
@RequestMapping("/admin")
@CrossOrigin
public class AdminLoginController {
    @Autowired
    private AdminService adminService;
    @PostMapping("/login")
    public Result login(@RequestBody Admin admin){
        return adminService.login(admin);
    }

}
